function [ lb,ub ] = bounds( npts,rob,bnd )
% generate control lower bounds and upper bounds
conlb = -[10;10;10;...
    4.2;8.4;6.3;...
    8.4;16.8;12.6]*0.8;
conub = [10;10;10;...
    4.2;8.4;6.3;...
    8.4;16.8;12.6]*0.8;

conlb(1:3)=conlb(1:3)/0.8*0.68;
conub(1:3)=conub(1:3)/0.8*0.68;

lb = [kron(ones(npts,1),conlb);zeros(9,1);0];
ub = [kron(ones(npts,1),conub);zeros(9,1);100];

% bound for obstacle
lens=[length(rob.link(1).c),length(rob.link(2).c),length(rob.link(3).c)];
nrob = sum(lens);
nobs = length(rob.obs.r);
radiusS=[rob.link(1).r,rob.link(2).r,rob.link(3).r];

lb = [lb;...
    kron(ones(npts,1),radiusS(:))+bnd.leftbound;...
    kron(ones(npts,1),radiusS(:))+bnd.lowerbound+9;...
    5*ones(nrob*nobs*npts,1);...
    -kron(ones(npts,1),[980;980])*0.8];
ub = [ub;...
    kron(ones(npts,1),-radiusS(:))+bnd.rightbound;...
    kron(ones(npts,1),-radiusS(:))+bnd.upperbound;...
    inf*ones(nrob*nobs*npts,1);...
    kron(ones(npts,1),[980;980])*0.8];


end

